package cheme.ProcessModel.Equations;

import cheme.ProcessModel.IModelElement;
import cheme.ProcessModel.ProcessModelConstants;
import cheme.ProcessModel.Table.Row;
import cheme.ProcessModel.Visitors.IModelVisitor;

public class EquationPalette extends Row
{
	/*
	 * Serialization version identifier. (Set to default for now)
	 */
	
	private static final long serialVersionUID = 1L;

	public EquationPalette(IModelElement parent)
	{
		super(parent);
		
		add(new EquationPaletteField(this, "=", ProcessModelConstants.PALETTE_ENTRY));
		add(new EquationPaletteField(this, "+", ProcessModelConstants.PALETTE_ENTRY));
		add(new EquationPaletteField(this, "-", ProcessModelConstants.PALETTE_ENTRY));
		//add(new EquationPaletteField(this, "/", ProcessModelConstants.PALETTE_ENTRY));//PA Commented Division
		add(new EquationPaletteField(this, "*", ProcessModelConstants.PALETTE_ENTRY));
		add(new EquationPaletteField(this, "^", ProcessModelConstants.PALETTE_ENTRY));
		add(new EquationPaletteField(this, "(", ProcessModelConstants.PALETTE_ENTRY));
		add(new EquationPaletteField(this, ")", ProcessModelConstants.PALETTE_ENTRY));
	}
	
	public Object accept(IModelVisitor ruleChecker)
	{
		return ruleChecker.visit(this);
	}
	
	public String toXml()
	{
		return super.toXml("EquationPalette");
	}
}
